<?php

class GeneralDAO {

    protected $host = "localhost";
    protected $dbname = "dbkaryawan";
    protected $user = "appkaryawan";
    protected $pass = "12345";
    protected $DBH;

    public function __construct() {
        try {
            $this->DBH = new PDO("mysql:host=$this->host;dbname=$this->dbname", $this->user, $this->pass);
            $this->DBH->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        } catch (PDOException $e) {
            echo $e->getMessage();
        }
    }

}

?>
